package cn.edu.ctbu.myfirstweb.service;

import cn.edu.ctbu.myfirstweb.domain.Course;
import cn.edu.ctbu.myfirstweb.domain.Student;
import cn.edu.ctbu.myfirstweb.domain.StudentScore;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface StudentService {
    List<Student> findAll();

    /***
     * 只分页的提取学生数据
     * @param pageable
     * @return
     */
    Page<Student> findAll(Pageable pageable);

    Page<Student> findAll(Example<Student> student, Pageable pageable);

    Student insert(Student student);

    Student update(Student student);

    Student query(Long id);

    Student findByName(String name);

    void deleteByName(String name);

    void deleteById(Long id);

    Student getById(Long id);

    Student getByNum(Long num);

    Student getByName(String name);

    boolean login(Student student);

    Student login(Long num, String password);

    List<StudentScore> getStudentScore(Long id);

    List<Course> getStudentCourse(Long id);

    List<Course> getThisSemesterCourse(Long id);
}
